package com.ruoyi.warehousemanager.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excels;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.annotation.Excel.Type;

import java.util.Date;

/**
 * 易耗品管理对象 j_item
 * 
 * @author fan
 * @date 2023-05-15
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Item extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 物品id */
    private Long itemId;

    /** 物品名称 */
    @Excel(name = "物品名称")
    private String itemName;

    /** 物品数量 */
    @Excel(name = "物品数量")
    private Long itemNum;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String itemUnit;

    /** 所属仓库id，外键 */
    private Long deptId;

    /** 类型id */
    private Long typeId;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("itemId", getItemId())
            .append("itemName", getItemName())
            .append("itemNum", getItemNum())
            .append("itemUnit", getItemUnit())
            .append("warehouseId", getDeptId())
            .append("typeId", getTypeId())
            .append("remark", getRemark())
            .toString();
    }
}
